


        package com.scetoop.bank;

public class Account {
    protected double balance;
    // 私有属性，账户余额(保护隐私)
//    private double balance;
    // 构造方法，初始化账户余额（先给yi点点钱）
    public Account(double init_balance){
        balance = init_balance;
    }
    // 获取账户余额的方法
    public double getBalance(){
        return balance;
    }
    public void withdraw(double amt) throws OverdraftException {

        if (balance < amt){
            throw new OverdraftException("资金不足",(amt - balance));
        }
        balance -= amt;
    }

    public void setCheckingAccount (){

    }

    public void deposit(double amt) {
    }
}

